﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" 
Inherits="Nivdal.SiteStatistics" Title="" Theme="SkinFile" Codebehind="SiteStatistics.aspx.cs" %>

<%@ Register Assembly="obout_Flyout2_NET" Namespace="OboutInc.Flyout2" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">   
    <asp:Panel runat="server" ID="DirectionPanel" Direction="LeftToRight">
    <div class="basic_element">
    <div class="red_title">
       <asp:Label ID="Label1" runat="server" Text="Admin pages >> Site statistics" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">

    
    <asp:Label ID="EmailsLabel" runat="server" SkinID="InfoLabel"></asp:Label>
    <br /><br />
    <asp:Label ID="TranslationStatusTitleLabel" runat="server" Text="Translation status:" SkinID="InfoLabel"></asp:Label>
    <br />
   
    <asp:GridView ID="TranslationStatusGridView" runat="server" DataSourceID="TranslationStatusDataSourse" AutoGenerateColumns="false" 
         SkinID="Professional" AllowPaging="true" PageSize="50"> 
        <PagerSettings FirstPageText="<%$ Resources:Resource, FirstPage %>" LastPageText="<%$ Resources:Resource, LastPage %>"
            Mode="NumericFirstLast" PageButtonCount="10" Position="TopAndBottom" />
        <PagerStyle CssClass="pagination" HorizontalAlign="Center" />
        <Columns>
            <asp:TemplateField HeaderText="Language">
                <ItemTemplate>
                    <asp:Label ID="LanguageNameLabel" runat="server" Text='<%# Eval("LanguageName") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="SQL strings">
                <ItemTemplate>
                    <asp:Label ID="OutOfLabel" runat="server" Text='<%# Eval("NumSentences") + " out of " + Eval("English") %>'  SkinID="GridLabel"></asp:Label>
                    <asp:Label ID="PercentageLabel" runat="server" Text='<%# " (" + ReturnPercentage(Eval("NumSentences"),  Eval("English")) + ")" %>'  SkinID="GridLabel"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Interface sentences">
                <ItemTemplate>
                    <asp:Label ID="InterfaceStatusLabel" runat="server" Text='<%# Eval("InterfaceStatus") %>' SkinID="GridLabel"></asp:Label>
                    
                </ItemTemplate>                   
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Data tables">
                <ItemTemplate>
                    <asp:Label ID="DataTablesLabel" runat="server" Text='<%# Eval("DataTablesStatus") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Match sentences">
                <ItemTemplate>
                    <asp:Label ID="MatchSentencesLabel" runat="server" Text='<%# Eval("MatchSentencesStatus") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView> 
     
    <asp:SqlDataSource ID="TranslationStatusDataSourse" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetGlobalTranslationStatus" SelectCommandType="StoredProcedure"></asp:SqlDataSource>    
    <br /><br />
    
    <asp:Label ID="StatisticsTitleLabel" runat="server" Text="Site weekly statistics:" SkinID="InfoLabel"></asp:Label>
    <br />
    <asp:GridView ID="StatsGridView" runat="server" SkinID="Professional" AutoGenerateColumns="false" 
    DataSourceID="StatsDataSorce" AllowPaging="true" PageSize="30">
        <PagerSettings FirstPageText="<%$ Resources:Resource, FirstPage %>" LastPageText="<%$ Resources:Resource, LastPage %>"
            Mode="NumericFirstLast" PageButtonCount="10" Position="TopAndBottom" />
        <PagerStyle CssClass="pagination" HorizontalAlign="Center" />
        <Columns>
            <asp:TemplateField HeaderStyle-Width="21%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderDateLabel" runat="server" Text="Date"></asp:Label>
                    <cc1:Flyout ID="DateToolTip" runat="server" FadingEffect="true" AttachTo="HeaderDateLabel" Position="TOP_CENTER" >
                        <div class="ToolTipStyle">
                            Date report created
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DateLabel" runat="server" Text='<%# Eval("Date") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>
            <asp:TemplateField HeaderStyle-Width="7%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderUsersLabel" runat="server" Text="Users"></asp:Label>
                    <cc1:Flyout ID="DateToolTip" runat="server" FadingEffect="true" AttachTo="HeaderUsersLabel" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Number of active users
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="NumUsersLabel" runat="server" Text='<%# Eval("NumUsers") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>            
            <asp:TemplateField HeaderStyle-Width="7%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel" runat="server" Text="Tran"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Transfers this week
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("TransfersThisWeek") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>  
            <asp:TemplateField HeaderStyle-Width="7%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel1" runat="server" Text="TAvg"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel1" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Average transfer sum this week
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("AverageTransferSumThisWeek") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>             
            
            <asp:TemplateField HeaderStyle-Width="7%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel2" runat="server" Text="CTran"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel2" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Coaches transfers this week
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("CoachesTransfersThisWeek") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>              
            
            <asp:TemplateField HeaderStyle-Width="7%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel3" runat="server" Text="TWC"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel3" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Number of teams with a coach
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("NumTeamsWithCoach") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>              
            
            <asp:TemplateField HeaderStyle-Width="7%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel4" runat="server" Text="TWSt"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel4" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Number of teams with a stadium
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("NumTeamsWithStadium") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>              
            
            <asp:TemplateField HeaderStyle-Width="7%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel5" runat="server" Text="UL1"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel5" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Number of users who logged in at least once last week
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("NumUsersLoggedIn1Time") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>              
            
            <asp:TemplateField HeaderStyle-Width="7%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel6" runat="server" Text="UL5"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel6" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Number of users who logged in at least 5 times last week
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("NumUsersLoggedIn5Times") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>              
            
            <asp:TemplateField HeaderStyle-Width="7%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel7" runat="server" Text="NFr"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel7" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Number of friendly matches this week
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("NumFriendlyMatchesThisWeek") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>              
            
            <asp:TemplateField HeaderStyle-Width="7%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel8" runat="server" Text="TWSp"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel8" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Number of teams with a sponsor
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("NumTeamsWithSponsor") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>              
            
            <asp:TemplateField HeaderStyle-Width="7%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel9" runat="server" Text="Posts"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel9" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Number of forum posts this week
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("NumForumPosts") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>              
            
            <asp:TemplateField HeaderStyle-Width="7%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel10" runat="server" Text="APF"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel10" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Number of active private forums
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("NumActivePrivateForums") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>              
            
        </Columns>
    </asp:GridView>

    <asp:SqlDataSource ID="StatsDataSorce" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetSiteStatistics" SelectCommandType="StoredProcedure"></asp:SqlDataSource>


    <br /><br />
    <asp:Label ID="DailyStatsTitleLabel" runat="server" Text="Daily statistics:" SkinID="InfoLabel"></asp:Label>
    <br />
    <asp:GridView ID="DailyStatsGridview" runat="server" SkinID="Professional" AutoGenerateColumns="false" 
    DataSourceID="DailyStatsDataSource" AllowPaging="true" PageSize="30">
        <PagerSettings FirstPageText="<%$ Resources:Resource, FirstPage %>" LastPageText="<%$ Resources:Resource, LastPage %>"
            Mode="NumericFirstLast" PageButtonCount="10" Position="TopAndBottom" />
        <PagerStyle CssClass="pagination" HorizontalAlign="Center" />
        <Columns>
            <asp:TemplateField HeaderStyle-Width="21%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderDateLabel" runat="server" Text="Date"></asp:Label>
                    <cc1:Flyout ID="DateToolTip" runat="server" FadingEffect="true" AttachTo="HeaderDateLabel" Position="TOP_CENTER" >
                        <div class="ToolTipStyle">
                            Date report created
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DateLabel" runat="server" Text='<%# Eval("Date") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>
            <asp:TemplateField HeaderStyle-Width="7%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderUsersLabel" runat="server" Text="Users"></asp:Label>
                    <cc1:Flyout ID="DateToolTip" runat="server" FadingEffect="true" AttachTo="HeaderUsersLabel" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Number of active users
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="NumUsersLabel" runat="server" Text='<%# Eval("NumUsers") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>            
            <asp:TemplateField HeaderStyle-Width="7%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel" runat="server" Text="Tran"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Transfers today
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("TransfersToday") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>  
            <asp:TemplateField HeaderStyle-Width="7%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel1" runat="server" Text="TAvg"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel1" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Average transfer sum today
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("AverageTransferSumToday") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>             
            
            <asp:TemplateField HeaderStyle-Width="7%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel2" runat="server" Text="CTran"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel2" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Coaches transfers today
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("CoachesTransfersToday") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>              
            
            <asp:TemplateField HeaderStyle-Width="8%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel3" runat="server" Text="TWC"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel3" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Number of teams with a coach
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("NumTeamsWithCoach") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>              
            
            <asp:TemplateField HeaderStyle-Width="8%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel4" runat="server" Text="TWSt"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel4" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Number of teams with a stadium
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("NumTeamsWithStadium") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>              
            
            <asp:TemplateField HeaderStyle-Width="8%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel6" runat="server" Text="UL"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel6" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Number of users who logged in today
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("NumUsersLoggedInToday") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>              
            
            <asp:TemplateField HeaderStyle-Width="8%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel7" runat="server" Text="NFr"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel7" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Number of friendly matches today
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("NumFriendlyMatchesToday") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>              
            
            <asp:TemplateField HeaderStyle-Width="8%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel8" runat="server" Text="TWSp"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel8" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Number of teams with a sponsor
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("NumTeamsWithSponsor") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>              
            
            <asp:TemplateField HeaderStyle-Width="8%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel9" runat="server" Text="Posts"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel9" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Number of forum posts today
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("NumForumPostsToday") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>              
            
            <asp:TemplateField HeaderStyle-Width="8%">
                <HeaderTemplate>
                    <asp:Label ID="HeaderLabel10" runat="server" Text="APF"></asp:Label>
                    <cc1:Flyout ID="ToolTip" runat="server" FadingEffect="true" AttachTo="HeaderLabel10" Position="TOP_CENTER">
                        <div class="ToolTipStyle">
                            Number of active private forums
                        </div>
                    </cc1:Flyout>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="DataLabel" runat="server" Text='<%# Eval("NumActivePrivateForums") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>                                
            </asp:TemplateField>              
            
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="DailyStatsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetSiteStatisticsDaily" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
    <br /><br />
    <asp:UpdatePanel ID="TrafficUpdatePanel" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
    
    <asp:Label ID="TrafficSourcesLabel" runat="server" Text="Traffic sources" SkinID="InfoLabel"></asp:Label>
    <br />
        <asp:GridView ID="TrafficSourcesGridview" runat="server" DataSourceID="TrafficSourcesDataSource" AutoGenerateColumns="false"
         AllowPaging="true" PageSize="30" SkinID="Professional" OnRowCommand="HideSource">
         <PagerSettings FirstPageText="<%$ Resources:Resource, FirstPage %>" LastPageText="<%$ Resources:Resource, LastPage %>"
            Mode="NumericFirstLast" PageButtonCount="10" Position="TopAndBottom" />
         <PagerStyle CssClass="pagination" HorizontalAlign="Center" />
         <Columns>
            <asp:TemplateField HeaderText="Source">
                <ItemTemplate>
                    <asp:HyperLink ID="SourceLink" runat="server" Text='<%# FormatLink(Eval("Source")) %>'
                     ToolTip='<%# Eval("Source") %>'
                     NavigateUrl='<%# Eval("Source") %>' Target="_blank" SkinID="GreenTitleHyperLink"></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Count">
                <ItemTemplate>
                    <asp:Label ID="CountLabel" runat="server" Text='<%# Eval("Count") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
               <ItemTemplate>
                   <asp:Button ID="HideButton" runat="server" Text="hide" OnClientClick="return confirm('This will delete the data about this traffic source and will not show any new traffic from it. Are you sure?')"
                    CommandArgument='<%# Eval("SourceID") %>' CommandName="hide" CssClass="GreenSmallButtonStyle" />
               </ItemTemplate>
            </asp:TemplateField>
         </Columns>
        </asp:GridView>    
    <asp:SqlDataSource ID="TrafficSourcesDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetTrafficSources" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
    </ContentTemplate>
    </asp:UpdatePanel>
     </div>
    </div>  
    </asp:Panel>        
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageNamePlaceHolder" Runat="Server">
    <asp:Label ID="PageNameLabel" runat="server" Text="Admin pages >> Site statistics" CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>

